import service from "@/utils/request";

export function sendCodeService(params = {}) {
  return service({
    url: "/student/sendCode",
    method: "post",
    data: params,
  });
}

export function codeLoginService(params = {}) {
  return service({
    url: "/student/code/login",
    method: "post",
    data: params,
  });
}

export function logoutService() {
  return service({
    url: "/student/logout",
    method: "delete",
  });
}

export function getStudentInfoService() {
  return service({
    url: "/student/info",
    method: "get",
  });
}

export function getStudentDetailService(studentId) {
  return service({
    url: "/student/detail",
    method: "get",
    params: { studentId },
  });
}


export function editStudentService(params = {}) {
  return service({
    url: "/student/edit",
    method: "put",
    data: params,
  });
}

export function updateHeadImageService(params = {}) {
  return service({
    url: "/student/head-image/update",
    method: "put",
    data: params,
  });
}

export function studentSubmitService(params = {}) {
  return service({
    url: "/student/question/rabbit/submit",
    method: "post",
    data: params,
  });
}